package JTCPconnection;

/**
 *
 * @author M-R-D
 */
public interface IMessageReceiver
{
    /**
     * This method will be called by TCPconnection when a message is received
     * by the TCPlistener thread
     * @param message
     * The message that has been received
     */
    public void receiveMessage(String message);

    /**
     * Called when a connection is established after listening
     */
    public void notifyConnected();
    
    /**
     * Called when the disconnect operation has finished
     */
    public void notifyDisconnected();
    
    /**
     * Called when the connection was lost. The TCPconnection will automatically call disconnect after this in order to reset. Do not call any TCPConnection methods until after notifyDisconnected() is called. 
     */
    public void notifyConnectionLost();
}
